#include "text.h"

text::text(void)
{
	 g_pFont = 0;
}

text::~text(void)
{
	if(g_pFont) g_pFont->Release();
}
void text::getFont(LPDIRECT3DDEVICE9 *pD3DDevice)
{
	D3DXCreateFont( *pD3DDevice,          // D3D device
                            80,                    // Height
                            0,                     // Width
                            FW_BOLD,               // Weight
                            1,                     // MipLevels, 0 = autogen mipmaps
                            FALSE,                 // Italic
                            DEFAULT_CHARSET,       // CharSet
                            CLIP_DEFAULT_PRECIS,   // OutputPrecision
                            ANTIALIASED_QUALITY,         // Quality
                            DEFAULT_PITCH | FF_DONTCARE, // PitchAndFamily
                            "Arial", // pFaceName               
							&g_pFont);


}
void text::showText(char *title, int x, int y) 
{            
   RECT rc3;
   SetRect( &rc3, x, y, 0, 0 ); // xy 
   g_pFont->DrawText( NULL, title, -1, &rc3, DT_NOCLIP, SPALVA);
  
   /**/
}
